package com.guaoran.interview.spring.event;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @author : 孤傲然
 * @description : 事件监听：注解方式
 * @date :2020/1/2 13:58
 */
@Component
public class BlackListNotifier2 {
    @EventListener
    @Async
    public void onApplicationEvent(BlackListEvent blackListEvent) {
        System.out.println("BlackListNotifier2:"+blackListEvent);
    }
}
